<?php include("../config.php"); ?>

<html>
<head>
<title><?php echo($name); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>
<body>
<h1><?php echo($name); ?></h1>
<?php
if(empty($_SESSION['login'])) {
echo("<h3>Connectez-vous pour voir cette page!");
}

else {

$id = $_GET['id'];
dbconnect();
$req = mysql_query("SELECT * FROM ".$prefix."url WHERE `key` = ".$id." LIMIT 1");
$data = mysql_fetch_assoc($req);
if($_SESSION['login'] != $data['owner']) {
echo("<p>Vous n'Ãªtes pas le propriÃ©taire de cette URL</p>");
}
else {
?>
<form action="doedit.php" method="post">
<p>Url: <input type="text" name="newurl" value="<?php echo($data['url']); ?>" /></p>
<input type="hidden" name="id" value="<?php echo($data['key']); ?>" />
<p><input type="submit" value="Editer" /></p>
</form>
<?php
}
?>







</table>
<?php
}
?>

</body>
</html>

